<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
defined('_JEXEC') or die();

?>
<table class="category">
            <thead>
                <tr>
                   
                    <th width="10%">Code</th>
                    <th width="15%">Cproject Name</th>                    
                    <th width="15%">Category Name</th>
                    <th width="15%">Start Date</th>
                    <th width="15%">End Date</th>
                    
                </tr>
            <tfoot>
                <tr>
                    <td colspan="6"></td>
                </tr>
            </tfoot>
            <tbody>
                <?php
                foreach ($this->items as $i => $item) {
                   $link =  JRoute::_('index.php?option=com_cproject&view=cproject&id='. $item->gslug);
                ?>
                <tr class="row<?php echo $i % 2; ?>">
                  
                    <td class="center"><?php echo $item->code; ?></td>
                    <td class="center">
                        <a href="<?php echo $link; ?>"><?php echo $this->escape($item->name); ?>
                         </a>
                    </td>
                    <td class="center"><?php echo $item->catname; ?></td>
                    <td class="center"><?php echo $item->start_date; ?></td>
                    <td class="center"><?php echo $item->end_date; ?></td>
                </tr>
                <?php
                }
                ?>
            </tbody>
            
            
        </table>

<form action="<?php echo htmlspecialchars(JFactory::getURI()->toString()); ?>" method="post" name="adminForm" id="adminForm">
    
  <?php if (!empty($this->items)) : ?>
	<?php?>
	<div class="pagination">

		
		 	<p class="counter">
				<?php echo $this->pagination->getPagesCounter(); ?>
			</p>
		

		<?php echo $this->pagination->getPagesLinks(); ?>
	</div>
    <div class="display-limit">
			<?php echo JText::_('JGLOBAL_DISPLAY_NUM'); ?>&#160;
			<?php echo $this->pagination->getLimitBox(); ?>
		</div>
	<?php endif; ?>
</form>